class Area < ActiveRecord::Base
  validates_presence_of :nombre
  default_scope :order => :nombre
  has_many :cargos
  has_many :factores_reconocimientos
  named_scope :activos,:conditions=>{:deleted_at=>nil}
  accepts_nested_attributes_for :factores_reconocimientos


  def destroy
    deleted_at=Time.now
    save
  end
end
